window.onload = function(){
	var oBainJi = document.getElementById('bianji');
	var oDiv1 = document.getElementById('div1');
	var oDiv2 = document.getElementById('div2');
	var startBtn = false;
	oBainJi.addEventListener('click', function() {
		startBtn = !startBtn;
		startBtn ? (oDiv1.style.display = 'none',oDiv2.style.display = 'block',oBainJi.innerHTML = '完成') :(oDiv1.style.display = 'block',oDiv2.style.display = 'none',oBainJi.innerHTML = '编辑') ;
	}, false);
	
	
	
	
	
	$.ajax({
					type: "post",
				url:"http://10.115.14.227/supermarket/data/my_commodit y_car.php",
					async: true,
					data: {'user_phone':  'xxxxx','commodity_id':'x','count': 1},
					dataType: "jsonp", //使用jsop开始跨域
					jsonp: "callback", //告诉后台，我需要一个回调函数
					jsonpCallback: "success_jsonpCallback", //回调函数的名称
					success: function(data) {
						//debugger;
		
						
						
						
					},
					error: function(data) {}
				})
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
